package com.example.AIstudy.util;

import com.example.AIstudy.domain.UserSkillScore;
import com.example.AIstudy.exception.AIstudyException;
import com.example.AIstudy.service.UserSkillScoreService;
import com.example.AIstudy.service.impl.UserScoreSkillServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.sql.Timestamp;
import java.util.Calendar;
import java.util.List;

@Component
public class MyThread extends Thread{

    UserSkillScoreService service;
    //学生的ID
    public Integer stuID;
    public MyThread(UserSkillScoreService service){
        this.service=service;
    }
    //开启一项任务
    public void run() {
        try{
            service.updateUserSkillByStuID(stuID);
        }catch (Exception e){
            System.out.println(e.getMessage());
           }
    }
}
